package com.xjoyt.pay.master.po;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xjoyt.pay.constants.DateConstant;

/**
 * 机构
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "t_company")
public class Company {

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "company_id", length = 36)
	public String id;

	/**
	 * 公司名称
	 */
	@Column(name = "company_name", length = 50)
	public String name;

	// /**
	// * 公司编号
	// */
	// @Column(name = "company_no", length = 50)
	// public String no;

	/**
	 * 区域全称
	 */
	@Column(name = "areaName", length = 255)
	public String areaName;

	/**
	 * 区域id
	 */
	@Column(name = "area_id", length = 255)
	public String areaId;

	/**
	 * 地址
	 */
	@Column(name = "address", length = 50)
	public String address;

	/**
	 * 邮箱
	 */
	@Column(name = "email", length = 50)
	public String email;

	/**
	 * 负责人
	 */
	@Column(name = "director", length = 50)
	public String director;
	/**
	 * 法人
	 */
	@Column(name = "corporate ", length = 50)
	public String corporate;

	/**
	 * 电话
	 */
	@Column(name = "phone", length = 50)
	public String phone;

	/**
	 * 录入日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "added_date")
	@JsonFormat(pattern = DateConstant.DATE_TIME_FORMAT_PATTERN, timezone = "GMT+8")
	public Date addedDate;

	/**
	 * 状态：激活、停用
	 */
	@Column(name = "is_enabled")
	@org.hibernate.annotations.Type(type = "yes_no")
	public Boolean enabled;

	/**
	 * 上级id
	 */
	@Column(name = "parent_id", length = 36)
	public String parentId;

	/**
	 * 路径
	 */
	@Column(name = "`path`", length = 5000)
	public String path;

	/**
	 * 备注
	 */
	@Column(name = "remark", length = 255)
	public String remark;
}
